package com.huilian.iotbox.admin.dao;

import com.huilian.iotbox.data.po.UserPermission;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface UserPermissionDao {
    List<UserPermission> findAllByUserId(Integer userId);

    void batchInsert(@Param("list") List<UserPermission> addUserPermissionList);

    void batchDelete(@Param("list") List<UserPermission> delUserPermissionList);

    int deleteByPermissionId(Integer permissionId);

    int updateSelectByPermissionId(@Param("permissionId") Integer permissionId, @Param("selected") boolean selected);
}
